package hlhj.fhp.supreme.customview

import android.app.Dialog
import android.content.Context
import android.content.Intent
import android.os.Bundle
import hlhj.fhp.supreme.R
import hlhj.fhp.supreme.activitys.OrderPayAty
import hlhj.fhp.supreme.activitys.PayAty
import hlhj.fhp.supreme.javabean.UnPayBean
import kotlinx.android.synthetic.main.group_pay_dialog.*
import java.util.ArrayList

/**
 * Created by Administrator on 2018\5\20 0020.
 */
class GroupPayDialog(context: Context,private val datas:ArrayList<UnPayBean.DataBean>) :Dialog(context, R.style.CustomDialog) {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.group_pay_dialog)
        val bean = datas[0]
        btCancel.setOnClickListener {
            dismiss()
        }
        btCommit.setOnClickListener {
            val intent = Intent(context, OrderPayAty::class.java)
            intent.putExtra("order",bean.order_sn)
            intent.putExtra("money",bean.money)
            context.startActivity(intent)
            dismiss()
        }
    }
}